﻿using Anke.SHManage.BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Anke.SHManage.Web.Areas.PR.Controllers
{
    public class PRTraceController : Controller
    {
        //
        // GET: /PR/PRTrace/
        //病历痕迹页面
        public ActionResult PRTraceList(string TaskCode, int PatientOrder)
        {
            ViewBag.TaskCode = TaskCode;
            ViewBag.PatientOrder = PatientOrder;
            return View();
        }

        //查询出病历痕迹列表
        [HttpPost]
        public ActionResult DataLoad()
        {
            //获取页容量
            int pageIndex = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageSize = int.Parse(Request.Form["page"]);
            //病历页面传过来的任务编码和序号
            //string TaskCode = "2012102023511100100101";
            //int PatientOrder = 1;
            string TaskCode = Request.Form["TaskCode"];
            int PatientOrder = int.Parse(Request.Form["PatientOrder"]);

            var list = new M_PatientRecordTraceBLL().GetPRTraceList(pageIndex, pageSize, TaskCode, PatientOrder);

            JsonResult j = this.Json(list, "appliction/json", JsonRequestBehavior.AllowGet);
            return j;
        }

    }

}
